home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / ste / autoexec.lzh / AUTOEXEC.TXT < prev    next >
Text File  |  1991-08-05  |  9KB  |  184 lines

  1. Copyright (C) 1991 by Klaus Pedersen.
  2.  
  3. JUKEBOX is a Public Domain program by
  4.  
  5.       Klaus Pedersen
  6.       Nyborgvej 217 4. TH
  7.       DK-5220 Odense SØ
  8.       Denmark
  9.  
  10.       EMAIL : micro@imada.ou.dk
  11.  
  12. You should check that you have the following files in the JUKEBOX
  13. directory:
  14.    AUTOEXEC\
  15.       AUTOEXEC.PRG         ; THE Program for the autofolder
  16.       AUTOEXEC.TXT         ; This file.
  17.       AUTOEXEC.SYS         ; sample autoexec.sys file.
  18.       MAKE_AEX.TTP         ; reads the auto folder and generates a
  19.                            ; autoexec.sys file.
  20.       SOURCE\
  21.          AUTOEXEC.PRJ      ; TC makefile.
  22.          AUTOEXEC.C        ; The source for the program
  23.          COOKIE.C          ; routine to read a cookie
  24.          LOADSEGM.C        ; routine to load and relocate segm file
  25.          PLAYER.S          ; routine to start and stop playing of segms
  26.          PLAYER.H          ; headers to the routines in 'player' module
  27.          NT_CONST.S        ; Hardware and TOS constants
  28.          MXALLOC.S         ; a TT compatible malloc
  29.          MXALLOC.H         ; header and manual for MXALLOC
  30.          TINYSTRT.S        ; small startup code...
  31.          MAKE_AEX.PRJ      ; TC makefile for MAKE_AEX.
  32.          MAKE_AEX.C        ; The source for MAKE_AEX program
  33.  
  34.  
  35. ---------------------------------------------------------------------
  36. / / / / / / / / INTRODUCTION  / / / / / / / / / / / / / / / / / / / /
  37. ---------------------------------------------------------------------
  38. Some time back (3 days) Jonathan Roy (as666@cleveland.freenet.edu,
  39. Genie: J.ROY18) asked me if I could make a program that could play a
  40. sample when the computer was started, well this is it...  Besides the
  41. possibility to play a sample, it also incoroperat a simple PROGRAMMING
  42. language. The language has conditionals, program execution, sample
  43. play, print and input commands.  Together all these commands make an
  44. very powerful program.
  45.  
  46. This program works on all ST's and TT's, but the sample playing
  47. feature only works on [MEGA] STe and TT.
  48.  
  49. The most usefull feature in this program is the ability to change the
  50. order of the auto programs, with a simple texteditor. And the ability
  51. to have more setups that can be choosen among with a key press...
  52.  
  53. ---------------------------------------------------------------------
  54. / / / / / / / / QUICK INSTALL / / / / / / / / / / / / / / / / / / / /
  55. ---------------------------------------------------------------------
  56. To install the program, do the following:
  57.     o  Run the program MAKE_AEX.TTP and write :
  58.            >c:\autoexec.sys
  59.        in the dialog box. The program will then generate a setup that
  60.        behaves just like useally autofolder setup.
  61.     o  Now rename (or copy) the old AUTO folder to a new one called
  62.        NEW_AUTO. 
  63.     o  Now make an empty AUTO-folder and copy AUTOEXEC.PRG to that.
  64.     o  Now try to reset the computer. Everything should start like it
  65.        used to do. If you press the SPACE bar before the program has
  66.        started - auto program execution will be bypassed.
  67.        
  68. For a more advanced setup, take a look at the supplied AUTOEXEC.SYS.
  69. To understand the commands please read the next chapter. The
  70. AUTOEXEC.SYS files can be edited with an simple editor, such as
  71. FirstWord or Tempus.
  72.  
  73.  
  74.  
  75. ---------------------------------------------------------------------
  76. / / / / / / / / THE PROGRAMMING LANGUAGE  / / / / / / / / / / / / / /
  77. ---------------------------------------------------------------------
  78. The language is a line for line interpretor, that is build around
  79. simple one letter tokens.
  80. All commands can be part of a conditional statement.
  81.  
  82. TOKEN             MEANING
  83.  ! <path>        Execute the program found at 'path'
  84.  > <path>        Play the sample found at 'path'.
  85.  P <message>     Print the message on the screen.
  86.  W <message>     Print the message on the screen and wait for key.
  87.                  If a default key have been set then that will be
  88.                  returned, if no other have been pressed, without 
  89.                  waiting for user action.  
  90.  D <char>        Set default Key (if no key in keyboard buffer us this)
  91.  # <dec. number> Set number of bytes to keep free below sample
  92.                  This is default 100Kbyte.
  93.  X               Stop executing.
  94.  ? <char>        Conditional, if more '?' follow, then the statement
  95.                  is true if one is conditions is true. 
  96.  ; <anything>    Comment, also mean 'end of line' if used after other
  97.                  command.
  98.  
  99. A line starts with a command or conditions followed by a command.
  100.  
  101. Example 1:
  102.       PIt is a nice day today.
  103.  
  104. -this is selfexplaning. (Print the message)
  105.  
  106. Example 2:
  107.       WPress a key :
  108.       ?a?p?ePYou pressed a letter from the word 'APE'
  109.       ?s>g:\sound\nt_comp\sounds\impact.seg
  110.       
  111. -this will cause the computer to wait for a key. If the key is
  112. 'a' or 'p' or 'e' it will print the message. If 's' was pressed then
  113. the computer will load the file 'impact.seg' and play it. Any other
  114. key will cause no action.
  115. Adding the line:
  116.        Ds
  117. will change the program so that it don't wait for the user to press a
  118. key but, instead uses 's' if no other key have been pressed. If you 
  119. had pressed a key before the 'W' command then that would have been used
  120. instead of the default.
  121. A default key can also be used in an conditional, like in:
  122.        ?a?b?cDq
  123.        ?q!program1.prg
  124.        ?d?q!program2.prx
  125. This will run the program 'program2' if 'a', 'b', 'c' or 'd' have
  126. been pressed, and 'program1' if 'a', 'b' or 'c' have been pressed...
  127.  
  128. ---------------------------------------------------------------------
  129. / / / / / / / / THE SAMPLES FILES / / / / / / / / / / / / / / / / / / / /
  130. ---------------------------------------------------------------------
  131. This program uses the sample format introduced by the PD-program, 
  132. NT_COMP, called SEGM-files. A SEGM-sample is always in signed binary, 
  133. and there is information about the playback frequency in the file, 
  134. which makes this program much more 'clean'. NT_COMP can convert all
  135. kinds of sample files in to SEGM format.
  136.  
  137.  
  138. ---------------------------------------------------------------------
  139. / / / / / / / / TECHNICAL BITS  / / / / / / / / / / / / / / / / / / /
  140. ---------------------------------------------------------------------
  141. This program uses the XBRA protocol to take the SOUND_VECTOR. It uses
  142. the ID 'zexc', when the sample is playing the routine don't chain to
  143. the original routine. That is restored when the sample stops.
  144.  
  145. All programs are started from lowest possible memory with all memory
  146. allocated to it, even if a sample is loaded. The reason for this is
  147. that the *legal* way to enlarge the screen memory or allocate memory
  148. in the top of TPA is to allocate all memory except the amount you are 
  149. interested in allocating, and then allocate that. The reason that the
  150. programs isn't loaded about the sample is that most auto-programs stay
  151. resident, and that would cause fragmentation of the free memory when 
  152. the sample is released again...
  153.  
  154. When a sample is loaded, there is allocated a block of memory of that 
  155. is big enough to hold both the free memory and the sample. When the
  156. sample have been loaded and started, the memory is released again. At
  157. this time no one owns it! Of course this will cause problems with
  158. virtual memory, but with virtual memory, we did not need to deallocate
  159. the memory again.  (or think about fragmentation).
  160.  
  161.  
  162. WHAT DO *I* DO?
  163. ---------------
  164. I would like you to contribute with : Ideas (for further
  165. developments) and code that you think needs to be included (I need
  166. compression code, filters and such). If this program shall improve
  167. and grow, then I need your help! Send in BUG-reports (I can't test
  168. the program on your computer - I need your help to do that!). If
  169. there is a thing you think is backward or silly let me know, _DO_NOT_
  170. say "this is obvious, someone else have told him", tell me yourself!
  171.  
  172. There are 3 ways to contact me :
  173.  
  174. SNAIL MAIL                  EMAIL                VOICE PHONE
  175. Klaus Pedersen              mic